import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '../views/layout/index'

Vue.use(VueRouter)

const routes = [{
  path: '/',
  name: 'index',
  component: Home,
  children: [{
    path: "/",
    name: "Console",
    component: () => import('../views/console/index')
  },
  {
    path: "/httpcode",
    name: "httpCode",
    component: () => import('../views/webapi/httpcode.vue')
  },
   {
    path: "/webapi",
    name: "Webapi",
    component: () => import('../views/webapi/login.vue')
  },
   {
    path: "/register",
    name: "Register",
    component: () => import('../views/webapi/register.vue')
  }
]
}]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
